package com.hello.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 租赁订单对象 rental_orders
 * 
 * @author hello
 * @date 2025-07-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RentalOrders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Long orderId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 租客用户ID */
    @Excel(name = "租客用户ID")
    private Long userId;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long deviceId;



    /** 租赁开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租赁开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 租赁结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租赁结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 实际归还日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际归还日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualReturnDate;

    /** 租赁天数 */
    @Excel(name = "租赁天数")
    private Long rentDays;

    /** 日租金 */
    @Excel(name = "日租金")
    private BigDecimal dailyRent;

    /** 总租金 */
    @Excel(name = "总租金")
    private BigDecimal totalRent;

    /** 押金 */
    @Excel(name = "押金")
    private BigDecimal deposit;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 订单状态：1-待支付，2-已支付，3-进行中，4-已完成，5-已取消，6-已退款 */
    @Excel(name = "订单状态：1-待支付，2-已支付，3-进行中，4-已完成，5-已取消，6-已退款")
    private Integer status;

    /** 支付状态：0-未支付，1-已支付，2-部分退款，3-全额退款 */
    @Excel(name = "支付状态：0-未支付，1-已支付，2-部分退款，3-全额退款")
    private Integer paymentStatus;

    /** 交付方式：1-自提，2-配送 */
    @Excel(name = "交付方式：1-自提，2-配送")
    private Integer deliveryType;

    /** 配送地址ID */
    @Excel(name = "配送地址ID")
    private Long deliveryAddressId;

    /** 自提地址 */
    @Excel(name = "自提地址")
    private String pickupAddress;

    /** 取消原因 */
    @Excel(name = "取消原因")
    private String cancelReason;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }

    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }
    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }
    public void setActualReturnDate(Date actualReturnDate) 
    {
        this.actualReturnDate = actualReturnDate;
    }

    public Date getActualReturnDate() 
    {
        return actualReturnDate;
    }
    public void setRentDays(Long rentDays) 
    {
        this.rentDays = rentDays;
    }

    public Long getRentDays() 
    {
        return rentDays;
    }
    public void setDailyRent(BigDecimal dailyRent) 
    {
        this.dailyRent = dailyRent;
    }

    public BigDecimal getDailyRent() 
    {
        return dailyRent;
    }
    public void setTotalRent(BigDecimal totalRent) 
    {
        this.totalRent = totalRent;
    }

    public BigDecimal getTotalRent() 
    {
        return totalRent;
    }
    public void setDeposit(BigDecimal deposit) 
    {
        this.deposit = deposit;
    }

    public BigDecimal getDeposit() 
    {
        return deposit;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setPaymentStatus(Integer paymentStatus) 
    {
        this.paymentStatus = paymentStatus;
    }

    public Integer getPaymentStatus() 
    {
        return paymentStatus;
    }
    public void setDeliveryType(Integer deliveryType) 
    {
        this.deliveryType = deliveryType;
    }

    public Integer getDeliveryType() 
    {
        return deliveryType;
    }
    public void setDeliveryAddressId(Long deliveryAddressId) 
    {
        this.deliveryAddressId = deliveryAddressId;
    }

    public Long getDeliveryAddressId() 
    {
        return deliveryAddressId;
    }
    public void setPickupAddress(String pickupAddress) 
    {
        this.pickupAddress = pickupAddress;
    }

    public String getPickupAddress() 
    {
        return pickupAddress;
    }
    public void setCancelReason(String cancelReason) 
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason() 
    {
        return cancelReason;
    }
    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }
    public void setUpdatedTime(Date updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() 
    {
        return updatedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderNo", getOrderNo())
            .append("userId", getUserId())
            .append("deviceId", getDeviceId())

            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("actualReturnDate", getActualReturnDate())
            .append("rentDays", getRentDays())
            .append("dailyRent", getDailyRent())
            .append("totalRent", getTotalRent())
            .append("deposit", getDeposit())
            .append("totalAmount", getTotalAmount())
            .append("status", getStatus())
            .append("paymentStatus", getPaymentStatus())
            .append("deliveryType", getDeliveryType())
            .append("deliveryAddressId", getDeliveryAddressId())
            .append("pickupAddress", getPickupAddress())
            .append("remark", getRemark())
            .append("cancelReason", getCancelReason())
            .append("createdTime", getCreatedTime())
            .append("updatedTime", getUpdatedTime())
            .toString();
    }
}
